<admintpl file="header" />
</head>

<body>
    <div class="wrap js-check-wrap">
        <ul class="nav nav-tabs">
            <li class="active"><a href="{:U('ConstructionLaisonNote/index')}">工程联系单管理</a></li>
            <if condition="($level eq '0' OR $level eq '1')">   
                <li><a href="{:U('ConstructionLaisonNote/add')}">新增工程联系单</a></li>
            </if>
        </ul>
        <form class="well form-search  form-inline" method="post" action="{:U('ConstructionLaisonNote/index')}">
            <div class="form-group">
                <label class="sr-only">提交设计单位内容</label>
                <input type="text" name="submit_content" class="form-control" value="{:I('request.submit_content','')}" placeholder="输入提交设计单位内容查找...">
            </div>
            <button class="btn btn-primary" type="submit">搜索</button>
            <a class="btn btn-danger" href="{:U('ConstructionLaisonNote/index')}">清空</a>
        </form>
        <table class="table table-hover table-bordered">
            <thead>
                <tr>
                    <th style="width:130px">编号</th>
                    <th>提交设计单位内容</th>
                    <th>设计回复内容</th>
                    <th>创建人</th>
                    <th>创建时间</th>
                    <th>最后修改时间</th>
                    <th style="width:80px;">是否发布</th>
                    <th>{:L('ACTIONS')}</th>
                </tr>
            </thead>
            <foreach name="results" item="vo">
                <tr>
                    <td>{$vo.code}</td>
                    <td class="c1">{$vo.submit_content}</td>
                    <td class="c2">{$vo.reply_and_modify}</td>
                    <td>{$vo.real_name}</td>
                    <td>{$vo.add_time}</td>
                    <td>{$vo.last_time}</td>
                    <td class="text-center">
                        <if condition="$vo['is_publish'] eq 1">
                            <i class="glyphicon glyphicon-ok text-success"></i>
                            <else />
                            <i class="glyphicon glyphicon glyphicon-remove text-danger"></i>
                        </if>
                    </td>
                    <td>
                    	<a href='{:U("ConstructionLaisonNote/view",array("id"=>$vo["id"]))}'>查看</a>
                        <if condition="$vo['is_publish'] eq 0 and ($level eq '0' OR $level eq '1')">
                    	|
                        <a href='{:U("ConstructionLaisonNote/edit",array("id"=>$vo["id"]))}'>修改</a>
                        |
                        <a class="js-ajax-delete" href="{:U('ConstructionLaisonNote/delete',array('id'=>$vo['id']))}">删除</a>
                        </if>

                        <if condition="$vo['is_publish'] eq 1 and $level eq '0'">
                        |
                        <a class="js-ajax-delete" href="{:U('ConstructionLaisonNote/delete',array('id'=>$vo['id']))}">删除</a>
                        </if>
                    </td>
                </tr>
            </foreach>
        </table>
        <div class="pagination">{$page}</div>
    </div>
    <script src="__PUBLIC__/js/common.js"></script>
    <script type="text/javascript">
        $(function () {
            $(".c1,.c2").each(function (index, ele) {
                var content = $(ele).html();
                if (content.length > 20) {
                    $(ele).attr("title", content);
                    $(ele).html(content.substr(0, 20) + "...");
                };
            });
        })
    </script>
</body>
</html>